package cn.com.elite;

import java.util.List;

import javax.sql.DataSource;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.jdbc.core.JdbcTemplate;


public class monitorBean {
	private static final Log log=LogFactory.getLog(monitorBean.class);
    private DataSource dataSource;
	public DataSource getDataSource() {
		return dataSource;
	}
	public void setDataSource(DataSource dataSource) {
		this.dataSource = dataSource;
	}
	
	public List QuerySql(String sql)throws Exception{
		JdbcTemplate jdbcTemplate=new JdbcTemplate(dataSource);
		List list=jdbcTemplate.queryForList(sql);
		return list;
		
	}
    

}
